function [prev, n] = first_f(in)
multiplier = [[0.08 0.35 0.57]' [0.67 0.24 0.09]' [0.41 0.16 0.43]'];
prev = in;
next = multiplier*prev;
n = 2;
cond = sqrt((next(1)-prev(1))^2 + (next(2)-prev(2))^2 + (next(3)-prev(3))^2);
while cond >= 1.0e-6
    prev = next;
    next = multiplier*prev;
    n    = n+1;
    cond = sqrt((next(1)-prev(1))^2 + (next(2)-prev(2))^2 + (next(3)-prev(3))^2);
end
n = n - 1;